/**
 * File: ProcessorService.java
 * Created by: mhaimel
 * Created on: 30 Mar 2009
 * CVS:  $Id: ProcessorService.java,v 1.3 2009/11/24 15:15:40 mhaimel Exp $
 */
package uk.ac.ebi.velvet.exec;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;

import uk.ac.ebi.velvet.exec.impl.ParallelProcessorService;

import com.google.inject.ImplementedBy;


/**
 * @author mhaimel
 *
 */
@ImplementedBy(ParallelProcessorService.class)
public interface ProcessorService {

	public void add(Process process);
	
	public void remove(Process process);
	
	public void process(Runnable task);
	
	public void process(String category,Runnable task);
	
	public <T> Future<T> process(Callable<T> task);
	
	public <T> Future<T> process(String category,Callable<T> task);

	public void shutdown(String category);

	public void shutdown(String category, boolean force);
	
	public void shutdown(boolean force);
	
	public void registerCategory(String category, Integer parallel);

}
